{% extends 'blog/base.html' %}

{% block content %}
<div class="container">

    <div class="row">

        <!-- 博客页面实体 -->
        <div class="col-md-8">
            <!-- 博客正文实体 -->
            <h1 class="page-header">
                {% if cate_name %}
                    分类：{{ cate_name }}
                {% elif tag_name %}
                    标签: {{ tag_name }}
                {% else %}
                    我的文章
                {% endif %}
            </h1>

            <!-- 博客正文 -->
            {% if article_list %}
                <div>
                    {% for article in article_list %}
                        <h2>
                            <a href="{% url 'app:detail' article.pk %}">{{ article.title }}</a>
                        </h2>
                        <p class="lead">
                            by Tom Ming</a>
                        </p>
                        <p><span class="glyphicon glyphicon-time"></span> {{ article.created_time }}</p>
                        <hr>
                    {% endfor %}
                </div>
            {% else %}
                <h3>抱歉，无搜索内容</h3>
            {% endif %}

        </div>

       <!-- 博客旁列 -->
        <div class="col-md-4">

            <!-- Blog Search Well -->

            <div class="well">
                <h4>Blog Search</h4>
                <form action="/search/" method="get">
                    <div class="input-group">
                        <input type="text" name="search_for" class="form-control">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="submit">
                                <span class="glyphicon glyphicon-search"></span>
                        </button>
                        </span>
                    </div>
                </form>
                <!-- /.input-group -->
            </div>

            <!-- Blog Categories Well -->
            <!--tag well-->
            {% include "blog/category.html" %}


            <!-- Side Widget Well -->
            <div class="well">
                <h4><span class="glyphicon glyphicon-align-justify"></span>    博客介绍</h4>
                <p>欢迎来到我的个人博客，此博客主要用于记录技术随笔，个人感想等各种杂文。由于初学编程，个中纰漏，望请指出，谢谢！</p>
            </div>

        </div>

    </div>
    <!-- /.row -->

</div>

{% endblock content %}


